<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <!-- 动态 style，属性名称采用小驼峰命名 -->
      <p
        :style="{ opacity, color: 'pink', fontSize: '20px', backgroundColor: 'yellow' }"
      >
        华哥真坏
      </p>
      opacity: <input type="text" v-model="opacity" />
    </div>
    <script src="./js/vue.js"></script>
    <script>
      const vm = new Vue({
        data: {
          opacity: 1,
        },
      });
      vm.$mount("#app");
    </script>
  </body>
</html>
